<template>
  <div class="alert-tip" @click="close">
    <div class="alert-wrapper">
      <div class="alert-icon">
        <span></span>
        <span></span>
      </div>
      <p class="alertMsg">{{ this.alertMsg }}</p>
    </div>
  </div>
</template>

<script>
export default {
  name: "AlertTip",
  props: {
    alertMsg: String,
  },
  methods: {
    close() {
      this.$emit("closeTip")
    },
  },
}
</script>

<style lang="less" scoped>
@import "../../common/style/mixin.less";
.alert-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
  .alert-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 22.5rem;
    height: 15rem;
    border-radius: 1rem;
    background-color: #fff;
    transform: translateX(-50%) translateY(-50%);
    .alert-icon {
      @icon-color: #6cbeee;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 5.8rem;
      height: 5.8rem;
      margin: 0 auto;
      border: 0.2rem solid @icon-color;
      border-radius: 50%;
      span:first-child {
        width: 0.2rem;
        height: 2.5rem;
        background-color: @icon-color;
      }
      span:last-child {
        width: 0.2rem;
        height: 0.3rem;
        margin-top: 0.5rem;
        background-color: @icon-color;
      }
    }
    .alertMsg {
      font-size: 1.4rem;
      color: #333;
      line-height: 2rem;
      text-align: center;
      margin-top: 1rem;
    }
  }
}
</style>
